/**
 * 
 */
package com.yidu.drug.action;

import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yidu.drug.model.DrugManagerModel;
import com.yidu.drug.model.InventoryRecordModel;
import com.yidu.drug.service.InventoryRecordService;

/**
 * @author tanglei
 * @date 2018年8月23日 上午11:54:25
 * @version 1.0
 */
@Controller
@RequestMapping("/InventoryRecord")
public class InventoryRecordAction {
	//注入库存记录Service
	@Resource
	private InventoryRecordService inventoryRecordService;
	
	/**
	 * 根据分公司ID查询
	 * @param inventoryRecord 传入一个库存记录对象
	 * @return 返回一个map集合
	 */
	@RequestMapping("/findByFilId")
	@ResponseBody
	public Map<String,Object> findByFilId(InventoryRecordModel inventoryRecord,HttpSession session){
		//得到用户对象
		DrugManagerModel us = (DrugManagerModel) session.getAttribute("manager");
		inventoryRecord.setFilId(us.getFilId());
		return inventoryRecordService.findByFilId(inventoryRecord);
	}
}
